-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImGuiIntegration: add tests, support ImDrawCmd::VtxOffset #90
Conversation
d974856
to
5bd9de3
Compare
I added a small test window to visually check for correct handling of If all goes well, it should look something like this with no obvious glitches: (screenshot taken on Chrome 97, with WebGL Draft Extensions enabled) |
Codecov Report
@@ Coverage Diff @@
## master #90 +/- ##
==========================================
- Coverage 77.20% 77.16% -0.05%
==========================================
Files 21 21
Lines 939 946 +7
==========================================
+ Hits 725 730 +5
- Misses 214 216 +2
Continue to review full report at Codecov.
|
Forgot to mention: this unconditionally requires imgui 1.71. Since that version is considered obsolete (ie. no official backward compatibility in the API), I'd say that's acceptable. If you'd prefer to support older versions, we can |
5bd9de3
to
ee8c63c
Compare
ImTextureID is void*
I added integration tests for All the scaffolding was taken from the Magnum Shader tests. Some special-casing (iOS?) may not be needed, I wasn't too sure about the interactions there. |
ee8c63c
to
b484d1f
Compare
Not sure what's happening to Github, it just completely skipped running CI 💩 |
06b0194
to
c0a987b
Compare
The linux-gles tests seem to be the only ones that run ctest without |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Tests look great 👍
Can we enable the GL tests in other CIs without too much breaking?
The GL tests run against SwiftShader, which is the only software GL implementation I was able to get working there, and it's GLES-only. I could enable it on macOS as well as Magnum builds got that recently already, on Windows I don't have any existing SwiftShader build to copy from yet, so there it will take some more effort.
After I manage to tag a release I plan to drop support for Ubuntu 16.04, and then I could try adding a Mesa llvmpipe build, to have an ability to test the full desktop GL. But that's still quite far ahead.
c0a987b
to
b654307
Compare
Thanks for the detailed review I think I fixed everything, except for replacing |
Since it's a UI library, I anticipate the test image corpus to grow over time, especially if/when we switch to our own text rendering, or to Magnum's own theme, for example. With small images TGAs are acceptable, but when they grow larger it stops being practical due to the huge file sizes. (Not to mention the lack of software support makes dealing with them kinda annoying, especially here in the browser.)
Just on the ES build, in You can reuse the relevant piece from magnum-integration/package/ci/unix-desktop.sh Lines 51 to 64 in 26e7ca9
|
Using rather basic integration tests by drawing a few shapes and then comparing the framebuffer content against known correct output. I hope the thresholds don't blow up in my face on WebGL.
b654307
to
d20f73f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Just realized the |
Merged as 26e7ca9...7931348, thanks for the reminder -- I changed the commits to enable the relevant plugins only for the ES CI builds. As of b29aeee there's also a GLES3 macOS build, I'll eventually add Windows variants once Magnum has them. |
Closes #82.
I'm not 100% sure if the version/extension checks are correct this way. Info was taken from https://doc.magnum.graphics/magnum/classMagnum_1_1GL_1_1Mesh.html#aaa49afa2c76cc12b8402418a6e31923f.
This also needs some more testing on GLES/WebGL, hence a draft PR.